/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lanSimulation.internals;

import lanSimulation.LogManager;

/**
 *
 * @author farooq
 */
public class AsciiDocument extends Document{
    
    public AsciiDocument(String text){
        super(text);
    }

    public void print(LogManager logManager){

        String author = "Unknown";
        String title = "ASCII DOCUMENT";

        if (text.length() >= 16) {
                author = text.substring(8, 16);
        }

        logManager.log("\tAccounting -- author = '" + author);
        logManager.log("' -- title = '" + title + "'\n");
        logManager.log(">>> ASCII Print job delivered.\n\n");
        logManager.flush();

    }

}
